#include <stdio.h>


int main()
{
	int one, two, three, four, five, six, seven, eight, nine, ten;
	int pjz;
	scanf("%d %d %d %d %d %d %d %d %d %d",&one, &two, &three, &four, &five, &six, &seven, &eight, &nine, &ten);
	pjz=(one+two+three+four+five+six+seven+eight+nine+ten)/10;
	//计算平均值
	int count=0;
	char ch[10];
 	ch[0] = one;
    ch[1] = two;
    ch[2] = three;
    ch[3] = four;
    ch[4] = five;
    ch[5] = six;
    ch[6] = seven;
    ch[7] = eight;
    ch[8] = nine;
    ch[9] = ten;
    for(int i=0;i<10;i++)
    {
    	if(ch[i]>pjz)
		count++;
	}
	printf("%d",count);
	return 0;
}